<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>arguments</title>
    <script>
        function fn() {
            console.log(arguments); // 里面存储了所有传递过来的实参
            console.log(arguments.length);
            console.log(arguments[1]);
            // 可以按照数组的方式遍历arguments
            for (var i = 0; i < arguments.length; i++) {
                console.log(arguments[i]);
            }
        }
        fn(1, 2, 3);
        fn(1, 2, 3, 4, 5);

    </script>
</head>

<body>

</body>

</html>